<!--#layout("/common/layout.html",{"jsBase":"/js/${target.urlBase}/${entity.code}/"}){ -->
<div class="layui-row">
    <form id="searchForm" class="layui-form layui-form-pane">
        <div class="layui-collapse" lay-filter="condictionCol">
            <div class="layui-colla-item">
                <h2 class="layui-colla-title">查询条件</h2>
                <div class="layui-colla-content layui-show">
                    <div class="layui-row">
                        <div class="layui-form-item">
                            <div class="layui-inline">

                                @for(item in attrs){

                                <label class="layui-form-label">${item.displayName}</label>
                                @if(isEmpty(item.dictType)){
                                 @select(item.elementType){
                                 @case 1:{ //输入框

                                <div class="layui-input-inline">
                                    <input type="text" name="${item.name}" autocomplete="off" class="layui-input">
                                </div>

                                @}
                                @case 2:{ //下拉框

                                <div class="layui-input-inline">
                                    <layui:simpleDataSelect name="${item.name}"  data="\${${item.name}List}"
                                                            attrId="id" attrName="name" laySearch="true" />
                                </div>
                                @}
                                @case 3:{ //复选框

                                <div class="layui-input-inline">
                                    <input type="checkbox" name="${item.name}" title="选项1" checked>
                                    <input type="checkbox" name="${item.name}" title="选项2">
                                </div>
                                @}
                                @case 4:{ //单选框

                                <div class="layui-input-inline">
                                    <select name="${item.name}" lay-verify="">
                                        <option value="">不限制</option>
                                        <option value="1">是</option>
                                        <option value="0">否</option>
                                    </select>
                                </div>
                                @}
                                @case 5:{ //文本域

                                <div class="layui-input-inline">
                                    <textarea name="${item.name}" placeholder="请输入" class="layui-textarea"></textarea>
                                </div>
                                @}
                                @case 6:{ //日期

                                <div class="layui-input-inline">
                                    <div class="date-range-pick">
                                        <input type="text" name="${item.name}Query" autocomplete="off" class="layui-input">
                                    </div>
                                </div>

                                @}
                                @}
                                @}else{
                                <layui:simpleDictSelect style='layui-input-inline' type="${item.dictType}" layVerify="${verifyFormat(item.verifyList)}"
                                                        id="${item.name}" name="${item.name}" value="" />
                                @}
                                @}
                                <button style="float: right;" class="layui-btn layui-btn-normal" type="button" id="searchFormSearch">搜索</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>

<div class="layui-btn-group">
    <layui:accessButton function="${target.urlBase}.${entity.code}.add" action="add">增加</layui:accessButton>
    <layui:accessButton function="${target.urlBase}.${entity.code}.edit" action="edit">编辑</layui:accessButton>
    <layui:accessButton function="${target.urlBase}.${entity.code}.del" action="del">删除</layui:accessButton>
    @if(entity.includeExcel){
    <layui:accessButton function="${target.urlBase}.${entity.code}.exportDocument" action="exportDocument">导出</layui:accessButton>
    <layui:accessButton function="${target.urlBase}.${entity.code}.importDocument" action="importDocument">导入</layui:accessButton>
    @}
</div>

<table id="${entity.code}Table" lay-filter="${entity.code}Table"></table>
<!--#} -->
<script>
    layui.use(['index'], function () {
        var index = layui.index
        index.init();
    });

</script>
